package company.C58_AC;

public class C3A {

    public static void main(String[] args) {
        C3A c3 = new C3A();
        System.out.println(c3.translateNum(12158));
    }

    public int translateNum(int num) {
        String str = String.valueOf(num);
        int length = str.length();
        int[] dp = new int[length + 1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 1; i < length; i++) {
            int tmpNum = Integer.parseInt(str.substring(i - 1, i + 1));
            if (tmpNum >= 10 && tmpNum <= 25) {
                dp[i + 1] += dp[i - 1];
            }
            dp[i + 1] += dp[i];
        }
        return dp[length];
    }
}
